import { useEffect } from 'react';

const Container = () => {
  const getdata = async () => {
    try {
      const sm4 = await WebAssembly.instantiateStreaming(
        fetch('/sm4.wasm'), // 注意前导斜线
        { env: { memory: new WebAssembly.Memory({ initial: 256 }) } },
      );
      console.log('WASM加载成功:', sm4);
    } catch (e) {
      console.error('WASM加载失败:', e);
    }
  };

  useEffect(() => {
    getdata();
  }, []); // 添加空依赖数组

  return <div>容器组件</div>;
};

export default Container;
